<template>
	<div class="component-item" :class="active?'selected':''" v-if="moduleData">
		<div class="flex center preview-item-top">
			<div class="del" @click.stop="delModule">
				<Icon type="ios-trash" size='22' style="color: white;" />
			</div>
		</div>
        <div class="activity-item-wrapper disFlex Flex-wrap Flex-between">
            <div class="activity-item disFlex vertical Flex-middle" v-for="(jtem,j) in moduleData.data">
                <div class="activity-item-image">
                    <img :src="jtem.image_url">
                </div>
                <div class="_text">{{jtem.title}}</div>
            </div>
        </div>
    </div>
</template>

<script>

export default {
  	name: 'ActivityModule',		
	props: {
		/**
	     * @description 起始值，即动画开始前显示的数值
	     */
	    moduleData: {
	      type: Object,
	      default: null
	    },
	    active: {
	    	type: Boolean,
	    	default: false
	    }
	},
    data () {
        return {
        	curpage: 0
    	}
    },
    methods: {
    	delModule() {
			this.$emit("delModule",this.moduleData);		
    	}
    },
    created() {
    },
    components: {
	}
 }
</script>

<style scoped>	

@import url("../baseModule.less");

.activity-item-wrapper {
	padding: 16px;
}
.activity-item-image img{
	height: 40px;
	width: 40px;
}
</style>
